
import ToastModel from "./ToastModel";
import BaseView from "../base/view/BaseView";
import ActionHelper from "../action/ActionHelper";

const {ccclass, property} = cc._decorator;
@ccclass
export default class ToastView extends BaseView {

    @property(cc.Label)
    label: cc.Label = null;

    protected model:ToastModel;


    start(){
        super.start();
        this.label.string = this.model.getContent();
        ActionHelper.toastAction(this.node,()=>{
            this.close();
        });            
    }

}
